.root {
    -fx-font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
    -fx-font-size: 14px;
    -fx-background-color: #1f1f1f; /* Win11 官方暗色背景 [[58]] */
}

.group-title,
.log-title {
    -fx-font-size: 18px;
    -fx-font-weight: 600;
    -fx-text-fill: #ffffff;
    -fx-padding: 12px 0 8px 0;
}

.text-field,
.password-field {
    -fx-background-color: #202020;
    -fx-border-color: #3a3a3a;        /* 关键：始终显示柔和边框 */
    -fx-border-width: 1px;
    -fx-border-radius: 4px;
    -fx-background-radius: 4px;
    -fx-padding: 8px 10px;
    -fx-text-fill: #ffffff;
    -fx-font-size: 14px;
    -fx-prompt-text-fill: #777777;
    -fx-effect: null;
}

.text-field:focused,
.password-field:focused {
    -fx-border-color: #0078d4;        /* Fluent 强调色 [[50]] */
    -fx-border-width: 2px;
    -fx-background-color: #252525;    /* 聚焦时背景略亮，增强反馈 */
}

.button {
    -fx-background-color: #2a2a2a;
    -fx-text-fill: #ffffff;
    -fx-border-color: transparent;
    -fx-border-radius: 4px;
    -fx-background-radius: 4px;
    -fx-padding: 8px 20px;
    -fx-font-size: 14px;
    -fx-font-weight: 500;
}

.button:hover {
    -fx-background-color: #333333;
}

.button:pressed {
    -fx-background-color: #3c3c3c;
}

.primary-button {
    -fx-background-color: #0078d4;    /* Fluent 主色 [[50]] */
    -fx-text-fill: white;
    -fx-border-color: transparent;
}

.primary-button:hover {
    -fx-background-color: #106ebe;    /* Fluent hover 色 [[50]] */
}

.primary-button:pressed {
    -fx-background-color: #005a9e;    /* Fluent pressed 色 [[50]] */
}

/* --- CheckBox: 紧凑布局，Win11 风格 --- */
.check-box {
    -fx-label-padding: 0 0 0 28;
    -fx-spacing: 8px;
}
.check-box .box {
    -fx-background-color: #202020;
    -fx-border-color: #555555;
    -fx-border-width: 2px;
    -fx-border-radius: 4px;
    -fx-background-radius: 4px;
    -fx-padding: 6px;
    -fx-effect: null;
}
.check-box:hover .box {
    -fx-border-color: #777777;
}
.check-box:selected .box {
    -fx-background-color: #0078d4;
    -fx-border-color: #0078d4;
}
.check-box .mark {
    -fx-background-color: transparent;
    -fx-padding: 0;
}
.check-box:selected .mark {
    -fx-background-color: white;
    -fx-shape: "M2.5 6.5L5.5 9.5L10.5 3.5";
    -fx-scale-shape: true;
    -fx-stroke-width: 2px;
    -fx-padding: 2px;
}
.check-box .text {
    -fx-fill: #ffffff;
}

.label {
    -fx-text-fill: #ffffff;
    -fx-font-size: 14px;
}
/* --- 修正版标题栏（不依赖系统字体）--- */
.title-bar {
    -fx-background-color: #1a1a1a;
    -fx-pref-height: 36px; /* 增高 */
    -fx-border-color: #333333;
    -fx-border-width: 0 0 1px 0;
    -fx-alignment: center-left;
    -fx-padding: 0 8px;
}

.title-bar .title-text {
    -fx-text-fill: #ffffff;
    -fx-font-size: 13px;
    -fx-font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
    -fx-padding: 0 0 0 4px;
    -fx-alignment: center-left;
}

.title-bar-button {
    -fx-pref-width: 46px;
    -fx-pref-height: 36px; /* 与标题栏同高 */
    -fx-background-color: transparent;
    -fx-border: none;
    -fx-padding: 0;
    -fx-alignment: center;
    -fx-cursor: hand;
    /* 使用通用字体，确保符号显示 */
    -fx-font-family: "Segoe UI Symbol", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
    -fx-font-size: 14px; /* 足够大，清晰可见 */
    -fx-text-fill: #ffffff;
}

.title-bar-button:hover {
    -fx-background-color: rgba(255, 255, 255, 0.1);
}

.title-bar-button:pressed {
    -fx-background-color: rgba(255, 255, 255, 0.2);
}

.close-button:hover {
    -fx-background-color: #e81123;
}

.close-button:pressed {
    -fx-background-color: #bf0f1d;
}